package com.newer.textdbnotepad.sdk

import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

/**url生成器*/
@OptIn(ExperimentalUuidApi::class)
object KeyBuilder {

    /**
     * 生成用户信息Url
     * */
    fun genUserInfoKey(userName: String): String {
        val uuid = Uuid.random()
        return "$userName-info-$uuid"
    }

    /**生成笔记url*/
    fun genNoteKey(userName: String): String {
        val uuid = System.currentTimeMillis()
        return "$userName-note-$uuid"
    }

}